<!--
This is the page where an admin can edit a user
-->
<h1><?php echo $title;?></h1>

<?php
//opens the form which sends data to the edit fundtion in the users controller
echo form_open('admin/users/edit');

// a form that gets an array that sets name, id and value
echo "<p><label for='username'>Username</label><br/>";
$data = array('name'=>'username','id'=>'username','size'=>25, 'value'=>$admin['username']);
echo form_input($data) ."</p>";

echo "<p><label for='username'>Firstname</label><br/>";
$data = array('name'=>'first_name','id'=>'first_name','size'=>25, 'value'=>$admin['first_name']);
echo form_input($data) ."</p>";

echo "<p><label for='username'>Lastname</label><br/>";
$data = array('name'=>'last_name','id'=>'last_name','size'=>25, 'value'=>$admin['last_name']);
echo form_input($data) ."</p>";

echo "<p><label for='username'>Birthday</label><br/>";
$data = array('name'=>'birthday','id'=>'birthday','size'=>25, 'value'=>$admin['birthday']);
echo form_input($data) ."</p>";

echo "<p><label for='email'>Email</label><br/>";
$data = array('name'=>'email','id'=>'email','size'=>50, 'value'=>$admin['email']);
echo form_input($data) ."</p>";

echo "<p><label for='pw'>Password</label><br/>";
$data = array('name'=>'password','id'=>'pw','size'=>32, 'value'=>$admin['password']);
echo form_password($data) ."</p>";

echo "<p><label for='bio'>Bio</label><br/>";
$data = array('name'=>'bio','id'=>'bio','size'=>32, 'value'=>$admin['bio']);
echo form_input($data) ."</p>";

echo "<p><label for='status'>Status</label><br/>";
$options = array('active' => 'active', 'inactive' => 'inactive');
echo form_dropdown('status',$options, $admin['status']) ."</p>";

echo form_hidden('id',$admin['id']);
echo form_submit('submit','update user');
echo form_close();


?>